package cn.com.yto56.coresystem.business.msg.web.job;

import cn.com.yto56.coresystem.business.msg.web.biz.IYtoMsgBiz;
import cn.com.yto56.coresystem.business.msg.web.biz.impl.YtoMsgBizImpl;
import cn.com.yto56.coresystem.common.msg.util.quartz.AbstractJobBean;
import cn.com.yto56.coresystem.common.msg.util.quartz.JobBean;
import cn.com.yto56.coresystem.common.msg.util.quartz.ScheduleJob;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by wangrui on 2017/6/2.
 */
@DisallowConcurrentExecution
@JobBean(cron = "${msg.job.reSendMsg.cron}", thread = "${msg.job.reSendMsg.threadNum}")
public class ReSendMsgJob extends AbstractJobBean {
	private static Logger logger = LoggerFactory.getLogger(ReSendMsgJob.class);
    public ReSendMsgJob() {
        super(SendMsgJob.class, YtoMsgBizImpl.class);
    }

    @Override
    public void run(JobExecutionContext context, ScheduleJob scheduleJob, Object service) {
    	logger.info(this.getClass().getSimpleName()+"reSendMsgJob---> begin()");
        ((IYtoMsgBiz) service).reSendMsg();
        logger.info(this.getClass().getSimpleName()+"reSendMsgJob---> end()");
    }
}
